API Documentation
Public Member Functions | List of all members
nkGraphics::Sampler Class Referenceabstract

Holds all the information needed of a sampler used during rendering. More...

Inheritance diagram for nkGraphics::Sampler:
nkGraphics::Resource nkExport::Exportable

Public Member Functions

 Sampler ()
 
virtual ~Sampler ()
 
virtual FILTER getFiltering () const =0
 
virtual TEXTURE_ADDRESS_MODE getAddressModeU () const =0
 
virtual TEXTURE_ADDRESS_MODE getAddressModeV () const =0
 
virtual TEXTURE_ADDRESS_MODE getAddressModeW () const =0
 
virtual COMPARISON_FUNC getComparisonFunc () const =0
 
virtual float getMipBias () const =0
 
virtual unsigned int getMaxAnisotropy () const =0
 
virtual float getMinLodLevel () const =0
 
virtual float getMaxLodLevel () const =0
 
virtual float getBorderColorR () const =0
 
virtual float getBorderColorG () const =0
 
virtual float getBorderColorB () const =0
 
virtual float getBorderColorA () const =0
 
nkMemory::StringView getFilteringAsString () const
 
nkMemory::StringView getAddressModeUAsString () const
 
nkMemory::StringView getAddressModeVAsString () const
 
nkMemory::StringView getAddressModeWAsString () const
 
nkMemory::StringView getComparisonFuncAsString () const
 
virtual void setBorderColors (float r, float g, float b, float a)=0
 
virtual void setBorderColorR (float value)=0
 
virtual void setBorderColorG (float value)=0
 
virtual void setBorderColorB (float value)=0
 
virtual void setBorderColorA (float value)=0
 
virtual void setLodLevels (float min, float max)=0
 
virtual void setMaxAnisotropy (unsigned int value)=0
 
virtual void setMipMapBias (float value)=0
 
virtual void setFilterMethod (FILTER value)=0
 
virtual void setAddressModeU (TEXTURE_ADDRESS_MODE value)=0
 
virtual void setAddressModeV (TEXTURE_ADDRESS_MODE value)=0
 
virtual void setAddressModeW (TEXTURE_ADDRESS_MODE value)=0
 
virtual void setComparisonFunc (COMPARISON_FUNC value)=0
 
virtual void resetToDefault ()=0
 
void setFilterMethodFromString (const nkMemory::StringView &value)
 
void setAddressModeUFromString (const nkMemory::StringView &value)
 
void setAddressModeVFromString (const nkMemory::StringView &value)
 
void setAddressModeWFromString (const nkMemory::StringView &value)
 
void setComparisonFuncFromString (const nkMemory::StringView &value)
 
virtual void exportClassToTree (nkExport::Node *rootNode) override
 
virtual void importClassFromTree (nkExport::Node *rootNode) override
 
- Public Member Functions inherited from nkGraphics::Resource
 Resource ()
 
 Resource (const nkMemory::StringView &path)
 
virtual ~Resource ()
 
virtual bool load ()=0
 
virtual void unload ()=0
 
bool isReadyForRendering () const
 
bool isUnloaded () const
 
RESOURCE_LOAD_STATE getLoadState () const
 
nkMemory::StringView getResourcePath () const
 
RESOURCE_TYPE getResourceTypeName () const
 
nkMemory::StringView getResourceName () const
 
bool getHidden () const
 
virtual void setResourcePath (const nkMemory::StringView &path)
 
void setResourceName (const nkMemory::StringView &name)
 
void setHidden (bool value)
 
- Public Member Functions inherited from nkExport::Exportable
 Exportable ()
 
virtual ~Exportable ()
 

Detailed Description

Holds all the information needed of a sampler used during rendering.

Constructor & Destructor Documentation

◆ Sampler()

nkGraphics::Sampler::Sampler ( )

◆ ~Sampler()

virtual nkGraphics::Sampler::~Sampler ( )
virtual

Destructor. See SamplerManager::erase().

Member Function Documentation

◆ getFiltering()

virtual FILTER nkGraphics::Sampler::getFiltering ( ) const
pure virtual
Returns
The filtering used.

◆ getAddressModeU()

virtual TEXTURE_ADDRESS_MODE nkGraphics::Sampler::getAddressModeU ( ) const
pure virtual
Returns
The used address mode on the U axis.

◆ getAddressModeV()

virtual TEXTURE_ADDRESS_MODE nkGraphics::Sampler::getAddressModeV ( ) const
pure virtual
Returns
The used address mode in the V axis.

◆ getAddressModeW()

virtual TEXTURE_ADDRESS_MODE nkGraphics::Sampler::getAddressModeW ( ) const
pure virtual
Returns
The used address mode on the W axis.

◆ getComparisonFunc()

virtual COMPARISON_FUNC nkGraphics::Sampler::getComparisonFunc ( ) const
pure virtual
Returns
The comparison function used.

◆ getMipBias()

virtual float nkGraphics::Sampler::getMipBias ( ) const
pure virtual
Returns
The mip bias used.

◆ getMaxAnisotropy()

virtual unsigned int nkGraphics::Sampler::getMaxAnisotropy ( ) const
pure virtual
Returns
The max anisotropy used.

◆ getMinLodLevel()

virtual float nkGraphics::Sampler::getMinLodLevel ( ) const
pure virtual
Returns
The min LOD level used.

◆ getMaxLodLevel()

virtual float nkGraphics::Sampler::getMaxLodLevel ( ) const
pure virtual
Returns
The max LOD level used.

◆ getBorderColorR()

virtual float nkGraphics::Sampler::getBorderColorR ( ) const
pure virtual
Returns
The used border color red component.

◆ getBorderColorG()

virtual float nkGraphics::Sampler::getBorderColorG ( ) const
pure virtual
Returns
The used border color green component.

◆ getBorderColorB()

virtual float nkGraphics::Sampler::getBorderColorB ( ) const
pure virtual
Returns
The used border color blue component.

◆ getBorderColorA()

virtual float nkGraphics::Sampler::getBorderColorA ( ) const
pure virtual
Returns
The used border color alpha component.

◆ getFilteringAsString()

nkMemory::StringView nkGraphics::Sampler::getFilteringAsString ( ) const
Returns
The filtering, translated as a string using the StructToString utility.

◆ getAddressModeUAsString()

nkMemory::StringView nkGraphics::Sampler::getAddressModeUAsString ( ) const
Returns
The address mode Y, translated as a string using the StructToString utility.

◆ getAddressModeVAsString()

nkMemory::StringView nkGraphics::Sampler::getAddressModeVAsString ( ) const
Returns
The address mode V, translated as a string using the StructToString utility.

◆ getAddressModeWAsString()

nkMemory::StringView nkGraphics::Sampler::getAddressModeWAsString ( ) const
Returns
The address mode W, translated as a string using the StructToString utility.

◆ getComparisonFuncAsString()

nkMemory::StringView nkGraphics::Sampler::getComparisonFuncAsString ( ) const
Returns
The comparison function, translated as a string using the StructToString utility.

◆ setBorderColors()

virtual void nkGraphics::Sampler::setBorderColors ( float  r,
float  g,
float  b,
float  a 
)
pure virtual

Sets the border color to use. Border color is used, depending on the addressing mode, when the uvw coordinates go out of [0.0, 1.0].

Parameters
rThe red component to use, between [0.0, 1.0].
gThe green component to use, between [0.0, 1.0].
bThe blue component to use, between [0.0, 1.0].
aThe alpha component to use, between [0.0, 1.0].

◆ setBorderColorR()

virtual void nkGraphics::Sampler::setBorderColorR ( float  value)
pure virtual

Individual setter for the border color.

Parameters
valueThe red component value to use, between [0.0, 1.0].

◆ setBorderColorG()

virtual void nkGraphics::Sampler::setBorderColorG ( float  value)
pure virtual

Individual setter for the border color.

Parameters
valueThe green component value to use, between [0.0, 1.0].

◆ setBorderColorB()

virtual void nkGraphics::Sampler::setBorderColorB ( float  value)
pure virtual

Individual setter for the border color.

Parameters
valueThe blue component value to use, between [0.0, 1.0].

◆ setBorderColorA()

virtual void nkGraphics::Sampler::setBorderColorA ( float  value)
pure virtual

Individual setter for the border color.

Parameters
valueThe alpha component value to use, between [0.0, 1.0].

◆ setLodLevels()

virtual void nkGraphics::Sampler::setLodLevels ( float  min,
float  max 
)
pure virtual

Sets the LOD levels to use.

Parameters
minThe minimal LOD level to use.
maxThe maximal LOD level to use.

◆ setMaxAnisotropy()

virtual void nkGraphics::Sampler::setMaxAnisotropy ( unsigned int  value)
pure virtual

Sets the maximal anisotropy level to use.

Parameters
valueThe maximal anisotropy level to use.

◆ setMipMapBias()

virtual void nkGraphics::Sampler::setMipMapBias ( float  value)
pure virtual

Sets the mip bias.

Parameters
valueThe bias to use.

◆ setFilterMethod()

virtual void nkGraphics::Sampler::setFilterMethod ( FILTER  value)
pure virtual

Sets the filter method.

Parameters
valueThe filtering method to use.

◆ setAddressModeU()

virtual void nkGraphics::Sampler::setAddressModeU ( TEXTURE_ADDRESS_MODE  value)
pure virtual

Sets the address mode.

Parameters
valueThe addres mode to use over the u axis.

◆ setAddressModeV()

virtual void nkGraphics::Sampler::setAddressModeV ( TEXTURE_ADDRESS_MODE  value)
pure virtual

Sets the address mode.

Parameters
valueThe addres mode to use over the v axis.

◆ setAddressModeW()

virtual void nkGraphics::Sampler::setAddressModeW ( TEXTURE_ADDRESS_MODE  value)
pure virtual

Sets the address mode.

Parameters
valueThe addres mode to use over the w axis.

◆ setComparisonFunc()

virtual void nkGraphics::Sampler::setComparisonFunc ( COMPARISON_FUNC  value)
pure virtual

Sets the comparison function.

Parameters
valueThe comparison function to use.

◆ resetToDefault()

virtual void nkGraphics::Sampler::resetToDefault ( )
pure virtual

Resets the sampler to its default configuration.

◆ setFilterMethodFromString()

void nkGraphics::Sampler::setFilterMethodFromString ( const nkMemory::StringView value)

Sets the filtering method, from a string.

Parameters
valueThe filtering method to use. Will be translated through StructToString.

◆ setAddressModeUFromString()

void nkGraphics::Sampler::setAddressModeUFromString ( const nkMemory::StringView value)

Sets the address mode on axis u from a string.

Parameters
valueThe address mode to use. Will be translated through StructToString.

◆ setAddressModeVFromString()

void nkGraphics::Sampler::setAddressModeVFromString ( const nkMemory::StringView value)

Sets the address mode on axis v from a string.

Parameters
valueThe address mode to use. Will be translated through StructToString.

◆ setAddressModeWFromString()

void nkGraphics::Sampler::setAddressModeWFromString ( const nkMemory::StringView value)

Sets the address mode on axis w from a string.

Parameters
valueThe address mode to use. Will be translated through StructToString.

◆ setComparisonFuncFromString()

void nkGraphics::Sampler::setComparisonFuncFromString ( const nkMemory::StringView value)

Sets the comparison function from a string.

Parameters
valueThe comparison function to use. Will be translated through StructToString.

◆ exportClassToTree()

virtual void nkGraphics::Sampler::exportClassToTree ( nkExport::Node rootNode)
overridevirtual

Basic exporting capabilities.

Parameters
rootNodeThe tree to export to.

Implements nkExport::Exportable.

◆ importClassFromTree()

virtual void nkGraphics::Sampler::importClassFromTree ( nkExport::Node rootNode)
overridevirtual

Basic importing capabilities.

Parameters
rootNodeThe tree to import from.

Implements nkExport::Exportable.


The documentation for this class was generated from the following file: